﻿@model BlackBird.Models.Contracts
@using BlackBird.Resources

@{
    ViewBag.Title = "Contracts";
    int index = 1;
}


@section title_toolbar
{

    <nav>
        <ul id="button_command">
            <li><a class="uploadContract">@BBStrings.UploadContract</a></li>
            <li><a class="deleteContract">@BBStrings.Delete</a></li>
            <li><a class="downloadContract">@BBStrings.Download</a></li>
            <li><span class="returnHome">@Html.ActionLink(BBStrings.ReturnHome, "Index", "Home")</span></li>
        </ul>
    </nav>
}

<h2>合同</h2>

<div id = "contacts_view" data-id = "@Model.ParentId" data-type="@Model.Type">
    <table>

        <colgroup>
               <col class="cv_xuhao"/>
               <col class="cv_filename"/>
               <col class="cv_uploaddata" />
               <col class="li_uploadname"/>
         </colgroup>
        <thead>
            <tr>
                <td>序号</td>
                <td>文件名</td>
                <td>上传日期</td>
                <td>上传者</td>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model.AllContracts)
            {
                <tr class = "contact_item" data-id = "@item.OwnerId">
                    <td>@(index++)</td>
                    <td><a href ="@item.DownloadUrl" target ="_blank" >@item.FileName</a></td>
                    <td>@item.UploadDate</td>
                    <td>@item.UploadUserName</td>
                </tr>
            }
        </tbody>
    </table>
</div>
